package com.tz.bean;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * Created by C_Marvin on 2016/10/9.
 */
@Component
public class ClassA {

    private ClassB b;

    public ClassA() {
    }

    @Autowired
    public ClassA(ClassB b) {
        this.b = b;
    }

    public void a(){
        System.out.println("a()逻辑执行...");
        b.b();
    }
}
